package com.speedchina.doormanager.enums;

public enum ResultEnum {


    SUCCESS(200, "ok"),

    /**
     * 错误请求
     */
    BAD_REQUEST(400, "Bad Request"),

    /**
     * 没有发现资源
     */
    NOT_FOUND(404, "Not Found"),

    /**
     * 服务器错误
     */
    INTERNAL_SERVER_ERROR(500, "Unknown Internal Error"),

    /**
     * 无效的参数
     */
    NOT_VALID_PARAM(40005, "Not valid Params"),


    SAVE_LOG_ERROR(40007, "保存日志错误"),

    /**
     * 操作不支持
     */
    NOT_SUPPORTED_OPERATION(40006, "Operation not supported"),

    /**
     * 未登录
     */
    NOT_LOGIN(50000, "Not Login"),

    UPLOAD_PHOTO_IS_EMPTY(4001, "上传图片不能为空"),

    UPLOAD_PHOTO_ERROR(4002, "上传图片失败"),

    THIS_DOOR_PLATE_ALREADY_COMPETE(50001, "该门牌已经"),
    ;


    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
